package STUDENT.TRANNGUYENQUAN.OOPs.OBJECT_AND_CLASSES.Bai6;

public class EvenOddControllers {
	public String CheckIsEvenOdd(Numbers num) {
		int i = 0;
		String strOut = "";
		Models model = new Models();
		do {
			if (model.ChanLe(num) == "chan") {
				if (i % 2 == 0) {
					if (strOut.isEmpty()) {
						strOut += i;
					} else {
						strOut += "-" + i;
					}

				}
			} else if (model.ChanLe(num) == "le") {
				if (i % 2 != 0) {
					if (strOut.isEmpty()) {
						strOut += i;
					} else {
						strOut += "-" + i;
					}
				}
			}
			i++;
		} while (i < num.getA());
		return strOut;
	}
}
